-- GENERATED SPELL FOR [Enraged Reef Crawler] --


function spell0_12347(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_12347', 620, 1)
end

function Sorts_12347(pUnit, Event)
local choix_sorts_12347 = math.random(0, 0)
if choix_sorts_12347 == 0 then
pUnit:RegisterEvent('spell0_12347', 1, 1)
end
end

function mob12347_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12347', math.random(1500, 3000), 1)
end

function mob12347_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12347_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12347_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12347, 1, 'mob12347_Action')
RegisterUnitEvent(12347, 2, 'mob12347_Leave')
RegisterUnitEvent(12347, 3, 'mob12347_Kill')
RegisterUnitEvent(12347, 4, 'mob12347_Die')
